{% assign param = include.param %}

<div class="param">
  <div class="param-pair">
    <dt class="param-name monospace {% if param.optional %}optional{% endif %}">{{param.name}}</dt>
    <dd class="param-def">
      {% if param.type %}
        <span class="param-type">
          {{ param.type }}

          {% if param.items %}
            {% if param.items.type %}
              [{{ param.items.type }}]
            {% else %}
              {% assign referral=param.items["$ref"] %}
              [{% include type-referral.html referral=referral %}]
            {% endif %}
          {% endif %}
        </span>
      {% elsif param["$ref"] %}
        {% assign referral=param["$ref"] %}
        <span class="param-type">{% include type-referral.html referral=referral %}</span>
      {% endif %}
      <span class="param-description">
        {{ param.description }}

        {% if param.enum[0] %}
          Allowed values: {{ param.enum | join: ', ' }}.
        {% endif %}
        {% include experimental.html item=param %}
      </span>
    </dd>
  </div>
  {% if param.items.properties or param.items.enum or param.items.description %}
  <div class="param-pair param-sub">
    <div class="param-name"></div>
    <div class="param-def">
      <h6>Array element:</h6>
      {{ param.items.description }}
      {% if param.items.properties[0] %}
        {% for param in param.items.properties %}
          {% include param.html param=param %}
          {% assign param = include.param %}
        {% endfor %}
      {% elsif param.items.enum[0] %}
        Allowed values: {{ param.items.enum | join: ', ' }}.
      {% endif %}
    </div>
  </div>
  {% endif %}
</div>
